//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.runjian.demo.base;

import lombok.Data;

@Data
public class BusinessException extends RuntimeException {
    private Integer code;
    private String message;

    public BusinessException(String message) {
        this.code = BusinessEnums.ERROR.getCode();
        this.message = message;
    }

    public BusinessException(Integer code, String message) {
        this.code = BusinessEnums.ERROR.getCode();
        this.code = code;
        this.message = message;
    }

    public BusinessException(BusinessEnum businessEnum) {
        super(businessEnum.getMessage());
        this.code = BusinessEnums.ERROR.getCode();
        this.code = businessEnum.getCode();
        this.message = businessEnum.getMessage();
    }

}
